import App from './App.vue';
import store from './store/index.js';
import router from './router';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './plugins/theme.js';
import { createApp } from 'vue';
import i18n from './lang/index.js';
import Validator from './utils/v-validator.js';
import vDrag from './utils/v-drag.js';
import axios from 'axios';
// sync the router with the vuex store.
// this registers `store.state.route`

let vueIns = createApp(App);
vueIns.config.globalProperties.$http = axios;//这里的$http就可以代替axios出现了
//配置根目录,(防止代码冗余
axios.defaults.baseURL = '/';
//注意后续使用app时要用 app.xxxxxx 而不是默认的createApp(App).xxxxxx
vueIns.use(Validator).use(store).use(ElementPlus).use(router).use(i18n).use(vDrag).mount('#app')

export default vueIns;